<?php
/*-----------------------------------------------------------------------------
 * COMMON FUNCTION OF YII CONTROLLER
 *---------------------------------------------------------------------------*/
  
class TestController extends Controller {

    public function actionIndex() {
				$model = new MyModel();

        $this->render('index', array(
            'model'     => $model,
        ));
    }
   
/*-----------------------------------------------------------------------------
 * FOR TEST
 *---------------------------------------------------------------------------*/

    public function accessRules() {
        $tArray = parent::accessRules();
        $ruleEx = array(
            array('allow',		
				  'actions' => array('test'),		
				  'users'=>array('*'),
			),
        );
        
        return array_merge($ruleEx, $tArray);
    }
		
		public function actionTest() {
        $this->setHeader();

        MyHelper::testVar($_SESSION);
    }
		
    private function setHeader() {
        header('Content-Type: text/html; charset= utf-8');
    }

}